import request from '@/utils/request'

// 获取分页列表或根据条件查找返回的分页列表
export const reqRoleListAsync = (page, limit, roleName) => {
  return request.get(`/admin/acl/role/${page}/${limit}?roleName=${roleName}`)
}
// 根据id列表删除角色
export const reqDeleteRoleListAsync = (idList) => {
  return request.delete(`/admin/acl/role/batchRemove`, {
    data: idList
  })
}
// 根据id删除角色
export const reqDeleteRoleItemAsync = (id) => {
  return request.delete(`/admin/acl/role/remove/${id}`)
}
// 根据id获取角色信息
export const reqGetRoleItemAsync = (id) => {
  return request.get(`/admin/acl/role/get/${id}`)
}
// 添加角色
export const reqAddRoleItemAsync = (role) => {
  return request.post(`/admin/acl/role/save`, role)
}
// 修改角色
export const reqUpdateRoleItemAsync = (role) => {
  return request.put(`/admin/acl/role/update`, role)
}

